import {
	Api
} from '@/common/api'
import {
	ApiBase
} from '@/common/api-base.js';

class appointMentClass extends ApiBase {
	///system/appointment/scheduling/search/list  查询预约排班列表用于用户预约
	getAppointschedule(query) {
		return Api.get(`${this._namespace}/appointment/scheduling/search/list`,query);
	}
	getlistplan(query){//治疗项目列表
		return Api.get(`${this._namespace}/plan/list`,query);
	}
	//h5/visit/getAllHospital   获取引导页所有医院
    getAllHospital(query) {
    	return Api.get(`${this._namespace}/statistics/getAllHospital`,query);
    }
	//system/patient/list/byPhone  获取已经就诊的医院
	getpatientHospital(query) {
		return Api.get(`${this._namespace}/patient/list/byPhone`,query);
	}
	///system/appointment 新增治疗预约
	postAppointment(data) {
		return Api.post(`${this._namespace}/appointment`,data);
	}
	///system/appointment/get/user/sign/info 用户签到信息
	getUserInfo(query) {
		return Api.get(`${this._namespace}/appointment/get/user/sign/info`,query);
	}
	///system/appointment/get/user/treatment/appointment/info  用户预约信息
	getUserAppointmentInfo(query) {
		return Api.get(`${this._namespace}/appointment/get/user/treatment/appointment/info`,query);
	}
	///system/appointment/{treatmentAppointmentIds}  删除治疗预约
	deleteAppointment(treatmentAppointmentIds) {
		return Api.delete(`${this._namespace}/appointment/${treatmentAppointmentIds}`);
	}
	///system/appointment 修改预约   ///system/appointment/update/applet  
	updateAppointment(data) {
		return Api.put(`${this._namespace}/appointment/update/applet`,data);
	}
	///system​/appointment​/{treatmentAppointmentId} 获取治疗预约详细信息
	getUserAppointmentText(treatmentAppointmentId) {
		return Api.get(`${this._namespace}/appointment/${treatmentAppointmentId}`);
	}
	// /system/appointment/appointment/num 用户未到期预约数量
    getUserAppointmentNum(query) {
    	return Api.get(`${this._namespace}/appointment/appointment/num`,query);
    }
	//appointment/scheduling/search/project/list 查询可预约项目列表用于用户预	getUserAppointmentscheduling(query) {		return Api.get(`${this._namespace}/appointment/scheduling/search/project/list`,query);	}
	
	///system/appointment/get/info/{treatmentAppointmentId}  获取治疗预约详细信息(预约消息使用)
	getAppointmentInfo(treatmentAppointmentId) {
		return Api.get(`${this._namespace}/appointment/get/info/${treatmentAppointmentId}`);
	}
	///system/appointment/treatmentAppointment/confirm/{treatmentAppointmentId} 预约确认
	getAppointmentInfoConfirm(treatmentAppointmentId) {
		return Api.post(`${this._namespace}/appointment/treatmentAppointment/confirm/${treatmentAppointmentId}`);
	}
	
}

export const appointMentApi = new appointMentClass('/system')